<template>
  <div>
    <div>
      <el-button @click="mocktianchong">mock填充</el-button>
    </div>
    <el-form :model="formData" :inline="true" label-width="auto">
      
      <el-form-item
        label="id"
        prop="id"
        data-type="INTEGER"
      >
        
        <el-input
          placeholder="id"
          style="width: 120px"
          v-model="formData['id']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="project_name"
        prop="project_name"
        data-type="TEXT"
      >
        
        <el-input
          placeholder="project_name"
          style="width: 120px"
          v-model="formData['project_name']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="prefix_url"
        prop="prefix_url"
        data-type="TEXT"
      >
        
        <el-input
          placeholder="prefix_url"
          style="width: 120px"
          v-model="formData['prefix_url']"
        ></el-input>
        
      </el-form-item>
      
    </el-form>
  </div>
</template>
<script>
  import { dateFormatYYYYMMDDHHmmss, isIOS } from '@/utils'
  import { alertWithPaylod } from '@/utils/alertUtils';

import axios from "axios";
export default {
  data() {
    return {
      formData: {},
    };
  },
  methods: {
    mocktianchong,
    initByDialog(_data) {
      if (_data && _data.id) {

        
           
        
           
        
           
        


        this.formData = _data;
      }
    },
    async submitByDialog() {
      var params = this.formData;
      var resylt = await axios
        .post("/api/apiproject/apis", {
          _name: "addorupdate",
          ...params,
        })
        .then((res) => res.data);
      console.log("resylt :", resylt);
      alertWithPaylod(resylt)

      return resylt;
    },
  },
};
</script>
